package com.alibaba.algo.components.permission.config;

import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.alibaba.algo.core.filter.HttpServletRequestBodyFilter;

@Configuration
public class ConfigurationFilter {
	
	@Bean
	public FilterRegistrationBean<HttpServletRequestBodyFilter> requestBodyFilterRegistration() {
		FilterRegistrationBean<HttpServletRequestBodyFilter> registration = new FilterRegistrationBean<HttpServletRequestBodyFilter>();
		registration.setName("httpServletRequestBodyFilter");
		registration.setOrder(1);
		registration.addUrlPatterns("/*");
		registration.setFilter(new HttpServletRequestBodyFilter());
		return registration;
	}
}
